﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using RSSNewsGrabberModule;
using RSSNewsGrabberModule.Mapping;
using RSSNewsGrabberModule.Models;

namespace RssDataProviderUnitTests
{
    [TestClass]
    public class RssParserUnitTests
    {
        private const string ADDITIONAL_INFO_ROOT = "addRoot";

        private static XDocument _data;

        [ClassInitialize]
        public static void Tests_Setup(TestContext context)
        {
            if (_data == null)
                _data = XDocument.Load(Environment.CurrentDirectory + "/FakeData/FakeData.xml");
        }

        [TestMethod] 
        public void ParseFromXml_NotSupportedAdditionalInfo_DataSuccessReturned()
        {
            var target = new RssParser<RssDataHeader, RssDataItem>(TestHelper.CreateTestFieldsMappings(), false,
                                                                   ADDITIONAL_INFO_ROOT);
            var result = target.ParseFromXml(_data);
        }

        
    }
}
